package com.entity;

import javax.persistence.*;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;
import java.math.BigDecimal;
import java.util.Date;

@Entity
@Table(name = "engineer_project_info")
@Getter @Setter @NoArgsConstructor
public class EngineerProjectInfo extends BaseEntity {

    private String companyName;

    @Column(name = "project_name",  length = 100)
    private String projectName;

    @Column(name = "start_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date startDate;

    @Column(name = "end_date")
    @Temporal(TemporalType.DATE)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date endDate;

    @Column(name = "contract_amount", precision = 15, scale = 2)
    private BigDecimal contractAmount = BigDecimal.ZERO;

    private BigDecimal progress = BigDecimal.ZERO;

    private BigDecimal inAmount = BigDecimal.ZERO;

    private BigDecimal outAmount = BigDecimal.ZERO;

    @Column(name = "remark", length = 500)
    private String remark;

}
